/*
 * @Author: shenya
 * @Date: 2023-09-12 10:17:06
 * @Description:话题api
 */
import request from '@/router/axios';
//分类查询
export function selectTopic(query) {
  return request({
    url: '/core/topic/classify/list',
    method: 'get',
    params: query,
  });
}
//新增分类
export function insertTopic(data) {
  return request({
    url: '/core/topic/classify',
    method: 'post',
    data,
  });
}
//通过id查询
export function seletTopicById(id) {
  return request({
    url: `/core/topic/classify/${id}`,
    method: 'get',
  });
}
//修改话题分类
export function updateTopic(data) {
  return request({
    url: '/core/topic/classify',
    method: 'put',
    data,
  });
}
//删除话题分类
export function deleteTopic(id) {
  return request({
    url: `/core/topic/classify/${id}`,
    method: 'delete',
  });
}

//话题查询
export function selectTopicList(query) {
  return request({
    url: '/core/topic/list',
    method: 'get',
    params: query,
  });
}
//新增话题
export function insertTopicList(data) {
  return request({
    url: '/core/topic',
    method: 'post',
    data,
  });
}
//通过id查询话题
export function selectTopicListById(id) {
  return request({
    url: `/core/topic/${id}`,
    method: 'get',
  });
}
//删除话题
export function deleteTopicList(id) {
  return request({
    url: `/core/topic/${id}`,
    method: 'delete',
  });
}
//修改话题
export function updateTopicList(data) {
  return request({
    url: '/core/topic',
    method: 'put',
    data,
  });
}
